<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets">


<ui:composition template="/templates/layout.xhtml">
	<ui:define name="corpo">
	
		<p:fieldset legend="Minhas Reservas">
	 
		<p:dataTable value="#{reservaBean.reservasDeUsuario}" var="reserva">
		
			<p:column headerText="Estacionamento">
				<h:outputText value="#{reserva.estacionamento.nome_fantasia}" />
			</p:column>

			<p:column headerText="Data da Reserva">
				<h:outputText value="#{reserva.dataEntrada}">
					<f:convertDateTime pattern="dd/MM/yyyy"/>
				</h:outputText>
			</p:column>
			
			<p:column headerText="Hora da Reserva">
				<h:outputText value="#{reserva.horaEntrada}">
					<f:convertDateTime pattern="HH:mm"/>
				</h:outputText>
			</p:column>

			<p:column headerText="Situacao">
				<h:outputText value="#{reserva.situacao}" />
			</p:column>
			
		</p:dataTable>
		</p:fieldset>
		<br/>		
		<div style="float: left;">
			<h:form>
				<h:commandLink action="/publico/meuCadastro.jsf" value="Voltar" styleClass="css3button"/>
			</h:form>
		</div>
				
	</ui:define>
</ui:composition>
</html>